package com.founder.bdyx.core.util;

import java.util.Random;

public class RandomUtil {

    public static String randomCode() {
        StringBuilder str = new StringBuilder();
        Random random = new Random();
        for (int i = 0; i < 6; i++) {
            str.append(random.nextInt(10));
        }
        return str.toString();
    }

    public static int randomCode2() {
        return (int) ((Math.random() * 9 + 1) * 100000);
    }

    public static void main(String[] args) {
        for(int i = 0;i<10;i++){
            System.out.println(RandomUtil.randomCode());
        }
    }
}
